home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / comm / net / AmiMUD.lha / AmiMUD / rexx / example2.amud < prev    next >
Text File  |  1996-09-28  |  839b  |  47 lines

  1. /* this example script shows how to use the am_log command */
  2.  
  3. address 'AmiMUD.1'
  4.  
  5. 'am_echo " "'
  6. 'am_echo "This script show how am_log works"'
  7.  
  8. 'am_echo " "'
  9.  
  10. 'am_echo "Now I''ll log the next 3 lines from the mud in the variable STUFF"'
  11. 'am_echo "Please note that the control will came again to the script ONLY"'
  12. 'am_echo "if it will receive 3 lines from the mud (or with the command #send"'
  13. 'am_echo "or if amimud is terminated."'
  14.  
  15. am_log 3 stuff
  16.  
  17. 'am_echo " "'
  18.  
  19. 'am_echo "Lines received:"'
  20.  
  21. do i=0 to 2
  22.   'am_echo "' i ':' stuff.i '"'
  23. end
  24.  
  25. 'am_echo " "'
  26.  
  27. 'am_echo " "'
  28.  
  29. 'am_echo "Ok, now I''ll log the 4 lines following the line with the word <now>"'
  30.  
  31. 'am_log 4 TEMP WAITFOR "now"'
  32.  
  33. 'am_echo " "'
  34.  
  35. 'am_echo "Lines received:"'
  36.  
  37. do i=0 to 3
  38.   'am_echo "' i ':' temp.i '"'
  39. end
  40.  
  41. 'am_echo " "'
  42.  
  43. 'am_echo " "'
  44.  
  45. 'am_echo "Script terminated."'
  46.  
  47.